package com.tx.springboot_demo.domain;

import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.PropertySource;
import org.springframework.stereotype.Component;

/**
 * @author ：tx
 * @description：读取自定义配置文件
 * @date ：Created in 2019/4/3 16:32
 * @modified By：
 * @version:
 */
@Component
@ConfigurationProperties(prefix = "tx") //自定义的properties
@PropertySource("classpath:mercury.properties") //扫描自定义的properties
public class MercuryProperty {
    private String name;
    private String work;

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getWork() {
        return work;
    }

    public void setWork(String work) {
        this.work = work;
    }
}
